<template>
  <PageMain>
    <template #header></template>
    <template #body>
      <div
        class="resource-view-1-box w-full h-full overflow-hidden box-border flex justify-start items-center flex-col"
      >
        <div
          class="content w-full h-[calc(100%_-_64px)] box-border p-[20px_24px] overflow-hidden overflow-y-auto"
        >
          <div
            class="w-full h-[56px] p-[16px_0] overflow-hidden box-border flex justify-start items-start"
            style="font-family: Microsoft YaHei; font-size: 16px; font-weight: bold; color: #394d73"
          >
            资产信息
          </div>
          <div class="info w-full h-auto p-[20px] box-border bg-[#f7f9fc] rounded-[8px]">
            <a-row>
              <a-col :span="8">
                <div class="content">
                  <span class="icon">资产名称 :</span>
                  <span class="text">{{ formInline.name }}</span>
                </div>
              </a-col>
              <a-col :span="8">
                <div class="content">
                  <span class="icon">资产编号 :</span>
                  <span class="text">{{ formInline.code }}</span>
                </div>
              </a-col>
            </a-row>
          
          </div>
          <div
            class="w-full h-[56px] p-[16px_0] overflow-hidden box-border flex justify-start items-start"
            style="font-family: Microsoft YaHei; font-size: 16px; font-weight: bold; color: #394d73"
          >
            数据权属
          </div>
          <CommonTable
            :showPagination="false"
            :columnsData="showDetailTableData"
            :tableData="tableData"
          >
          <template #operator>
              <a-button type="text" 
                >编辑</a-button
              >
             
            </template>
        </CommonTable>
        </div>
      </div>
    </template>
  </PageMain>
</template>

<script lang="ts" setup>
import { ref, onMounted, reactive } from 'vue';
import PageMain from '@/components/PageBox.vue';
import { showDetailTableData } from './components/values';
import { check } from '@/api/assetManagement/resourceProject';
import CommonTable from '@/components/CommonTable.vue';

// 表单数据
const formInline = reactive({
  actual: '10000000', //实际花费
  begin_time: '2024-03-11', //开始时间
  budget: '11111', //预算
  code: 'kxcs09086', //项目编号
  describe: '进行科学实验测试', //项目描述
  end_time: '2024-08-13', //结束时间
  id: 1, //项目id
  manager: '王守之', //项目经理
  name: '科学实验项目', //项目名称
  project_persons: null, //项目人员
  status: '完成' //状态
});
const tableData = ref([{}]);
tableData.value = [
  {
    affiliation: '科学部', // 所属部门
    job_number: '9023840', // 工号
    name: '王守仁', // 姓名
    office: '项目经理', // 职务
    qualifications: '研究生' // 学历
  }
];

/**
 * @method  获取详情
 */
const checkDetail = () => {
  //调接口放开
  /* const { data } = await check({ id: route.query.id });
   Object.keys(data).forEach(key => {
     if (formInline.hasOwnProperty(key)) {
       formInline[key] = data[key];
     }
   });
   tableData.value = data.project_persons;*/
};

// const closeBtn = () => {
//   router.push({
//     name: 'projectIndex'
//   });
// };

onMounted(() => {
  checkDetail();
});
</script>

<style lang="less" scoped>
.MainBox {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.TabPaneClass {
  padding: 0 30px;
}
.content {
  margin-bottom: 33px;
  font-size: 14px;
  font-family: MicrosoftYaHei;
  color: #465a80;

  .icon {
    color: #a3b0cc;
    font-family: Microsoft YaHei;
    font-size: 14px;
    font-weight: normal;
  }
  .text {
    padding-left: 16px;
    color: #465a80;
    font-family: Microsoft YaHei;
    font-size: 14px;
    font-weight: normal;
  }
}
.footer {
  border-top: 1px solid #ebf0fa;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end;
  height: 50px;
  align-items: center;
}
.circle-point {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border-width: 2px;
}
</style>
